#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
  printf("请输入月份：\n");
  int month;
  scanf("%d", &month);
  printf("请输入年龄：\n");
  int age;
  double price;
  scanf("%d", &age);
  switch (month) {
  case 1:
  case 2:
  case 3:
  case 11:
  case 12: {
    price = 20;
    if (age > 18 && age < 60) {
      price = 40;
    }
  } break;
  case 4:
  case 5:
  case 6:
  case 7:
  case 8:
  case 9:
  case 10: {
    price = 60;
    if (age > 60) {
      price = price / 3;
    } else if (age >= 18) {
    } else {
      price = price / 2;
    }
  } break;
  }
  printf("票价是：%lf\n", price);
  return EXIT_SUCCESS;
}
